<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/list.css"/>
		<!--前后端分离使用的分页插件bootstrap-table-->
		<link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/bootstrap-table.min.css" rel="stylesheet">
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/bootstrap-table.min.js"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/locale/bootstrap-table-zh-CN.min.js"></script>
	</head>
	<body>
	<table id="courier_list"></table>
	<script>
		$(function () { //入口函数
			$("#courier_list").bootstrapTable({//选中元素，调用bootstrapTable方法，传递配置参数
				url:"/courier/list.do", //请求地址
				striped:true,//是否显示行间隔
				pageNumber:1,//初始化加载第几页
				pagination:true,//是否分页
				sidePagination:'server',//服务器端分页
				pageSize:5,//每页显示数
				pageList:[5,10,20],//可选择每页显示的的记录数
				showRefresh:true,//刷新按钮
				queryParams:function (params) {//查询参数
					var temp={ //创建对象,
						//存放服务器端分页需要的参数:分页查询的起始索引、每页记录数
						//从分页插件提供的params中获取
						offset:params.offset,
						pageNumber: params.limit
					};
					return temp;
				},
				columns:[  //分页列表的列
					{
						title:"id", //列名
						field:"id",  //实体类字段
						sortable:true
					},
					{
						title:"编号",
						field:"number",
						sortable:true
					},
					{
						title:"姓名",
						field:"username",
						sortable:true
					},
					{
						title:"手机号码",
						field:"phone",
						sortable:true
					},
					{
						title:"身份证",
						field:"cardId",
						sortable:true
					},
					{
						title:"密码",
						field:"password",
						sortable:true
					},
					{
						title:"派件数",
						field:"sendNumber",
						sortable:true
					},
					{
						title:"注册时间",
						field:"createTime",
						sortable:true
					},
					{
						title:"上次登录时间",
						field:"lasTime",
						sortable:true
					}
				]
			});
		})
	</script>
	</body>
</html>
